Repository navigation
feat(kraefte): set a Fahrzeug's status from where Organisation places it - #857
Merged
Merged
Conversation
Placing a unit in a Bereitstellungsraum sets its status to Bereitstellungsraum; placing it in an Abschnitt or Unterabschnitt sets Im Einsatz. Both placement paths, the Organisation board and the Kräfte list's Abschnitt picker, go through the new UnitPlacement helper. Taking a unit out of its node leaves the status alone. The status takes the Stammdaten's own spelling when the catalogue lists it, and the fixed name otherwise. The helper issues the existing MoveForceUnit and UpdateForceUnit session calls, so the wire contract is unchanged and the ETB records the move and the status change as two lines. Fixes #827 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #827
What
When Organisation places a Fahrzeug, its status in the Kräfte tab now follows:
This applies to both ways of placing a unit: the Organisation board (drag-drop and picker) and the ABSCHNITT picker in the Kräfte list.
How
UnitPlacementhelper inLageBuch.AppLogic/Servicesis used by bothLeadershipViewModel.MoveUnitand the picker inForcesViewModel. It calls the existingMoveForceUnit, then callsUpdateForceUnitwhen the status changes. The Bemerkung is kept.StammdatenCatalogue.Normalize). Otherwise it uses the fixed name, so a fresh install without Stammdaten still works.SyncCommandand no protocol bump, and a joined client behaves the same. The ETB gets two lines,… → BR Nordand…: Status Auf Anfahrt → Bereitstellungsraum.Incident.MoveForceUnitbecause only AppLogic can see the Stammdaten catalogue, and keeping it there avoids a wire change.Not in this PR
UI
No
.axamlchanged. The Kräfte status cell already re-renders from the session, so there are no screenshots.Evidence
make clean ci: all 9 test assemblies pass, 0 errors.make format-check: clean.make codeql: 0 results on changed lines.make mutate PROJECT=AppLogic SINCE=origin/main: 84.2 % on changed lines (16 of 19 caught). Two of the three survivors (FirstOrDefault→First) are now killed by an added test. The third is equivalent: a null implied status only comes from a Partner node, which the domain refuses before anything is written.🤖 Generated with Claude Code